package com.think.teaching.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author think
 * @since 2020-08-12
 */
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Course extends BaseModel<Course> {
	
	public static final int VR_MODE = 1;
	
	public static final int INTERACTIVE_MODE = 2;
	
	public static final int LIVE_MODE = 3;
	
	public static final int UNDEFINE_MODE = -1;

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 课程名称
     */
    private String courseName;

    /**
     * 课程类别
     */
    private Integer type;

    /**
     * 介绍视频
     */
    private String video;

    /**
     * 课程形式
     */
    private Integer mode;
    
    /**
     * 课程所属学院
     */
    private Integer college;

    /**
     * 课程封面
     */
    private String courseImg;

    /**
     * 课程学时
     */
    private Integer duration;

    
    /**
     * 考核标准
     */
    private String examStandard;
    
    /**
     * 课程学分
     */
    private Integer score;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;
    
    private Integer ilabAppId;

    private String ilabAppSecret;

    /**
     * 课程详细介绍
     */
    private String description;

    /**
     * 是否必修
     */
    private Integer requireFlag;

    /**
     * 是否是模板
     */
    private Integer template;
    
    /**
     * 课程负责人
     */
    private Integer teacher;
    
    /**
     * 课程简介
     */
    private String introduction;
    
    
    private String courseDesign;
    
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private CourseMember teacherInfo;


    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private List<Chapter> chapters;
    
    @TableField(exist = false)
    private List<Integer> tagIds;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private CourseType typeInfo;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private List<Tag> tags;
    
    
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private College collegeInfo;


    public List<Chapter> getChapters() {
		return chapters;
	}

	public void setChapters(List<Chapter> chapters) {
		this.chapters = chapters;
	}

	public List<Integer> getTagIds() {
		return tagIds;
	}

	public void setTagIds(List<Integer> tagIds) {
		this.tagIds = tagIds;
	}

	public CourseType getTypeInfo() {
		return typeInfo;
	}

	public void setTypeInfo(CourseType typeInfo) {
		this.typeInfo = typeInfo;
	}

	public List<Tag> getTags() {
		return tags;
	}

	public void setTags(List<Tag> tags) {
		this.tags = tags;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public Integer getMode() {
        return mode;
    }

    public void setMode(Integer mode) {
        this.mode = mode;
    }

    public String getCourseImg() {
        return courseImg;
    }

    public void setCourseImg(String courseImg) {
        this.courseImg = courseImg;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getRequireFlag() {
        return requireFlag;
    }

    public void setRequireFlag(Integer requireFlag) {
        this.requireFlag = requireFlag;
    }

    public Integer getTemplate() {
        return template;
    }

    public void setTemplate(Integer template) {
        this.template = template;
    }

    
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Course{" +
        "id=" + id +
        ", courseName=" + courseName +
        ", type=" + type +
        ", video=" + video +
        ", mode=" + mode +
        ", courseImg=" + courseImg +
        ", duration=" + duration +
        ", score=" + score +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", state=" + state +
        ", description=" + description +
        ", requireFlag=" + requireFlag +
        ", template=" + template +
        ", createdBy=" + createdBy +
        ", createdTime=" + createdTime +
        ", updatedBy=" + updatedBy +
        ", updatedTime=" + updatedTime +
        ", delflag=" + delflag +
        "}";
    }

	public Integer getTeacher() {
		return teacher;
	}

	public void setTeacher(Integer teacher) {
		this.teacher = teacher;
	}

	public CourseMember getTeacherInfo() {
		return teacherInfo;
	}

	public void setTeacherInfo(CourseMember teacherInfo) {
		this.teacherInfo = teacherInfo;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public Integer getCollege() {
		return college;
	}

	public void setCollege(Integer college) {
		this.college = college;
	}

	public College getCollegeInfo() {
		return collegeInfo;
	}

	public void setCollegeInfo(College collegeInfo) {
		this.collegeInfo = collegeInfo;
	}

	public String getExamStandard() {
		return examStandard;
	}

	public void setExamStandard(String examStandard) {
		this.examStandard = examStandard;
	}

	public String getCourseDesign() {
		return courseDesign;
	}

	public void setCourseDesign(String courseDesign) {
		this.courseDesign = courseDesign;
	}

	public Integer getIlabAppId() {
		return ilabAppId;
	}

	public void setIlabAppId(Integer ilabAppId) {
		this.ilabAppId = ilabAppId;
	}

	public String getIlabAppSecret() {
		return ilabAppSecret;
	}

	public void setIlabAppSecret(String ilabAppSecret) {
		this.ilabAppSecret = ilabAppSecret;
	}

}
